import type { loginPasswordApi } from '@/types/user'
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useUserStore = defineStore(
  'user',
  () => {
    const userInfo = ref<loginPasswordApi>()
    const setUserInfo = (value?: loginPasswordApi | undefined) => {
      userInfo.value = value
    }

    return { userInfo, setUserInfo }
  },
  {
    persist: {
      paths: ['userInfo']
    }
  }
)
